#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

void bubbleSort(vector<int>& v)
{
    int size = v.size();
    int judge = 0;
    for(int i = size-1;i>0;--i)
    {
        if(1 == judge)
        return;
        for(int j = 0;j+1<=i;++j)
        {
            if(v[j]>v[j+1])
            {
            std::swap(v[j],v[j+1]);
            ++judge;
            }
        }
    }
}